
// WS云端发送数据
let clientSendJson = {
    header: {
        requestId: tag,
        messagePurpose: purpose,
        version: 1,
        messageType: 'commandRequest',
        
    },
    body: {
        data: data,
        //eventName: 'PlayerMessage'
        version: 1
    }
};

//===================================================================
//===================================================================
//===================================================================
// MC客户端发送数据1.21.2

// testfor @s 的客户端答复
let testfor = {
  body: { statusCode: 0, statusMessage: '发现 Wn1027', victim: [ 'Wn1027' ] },
  header: {
    messagePurpose: 'commandResponse',
    requestId: '/vanilla/init/name',
    version: 17039360
  }
};

let testforblock = {
  body: {
    matches: true,
    position: { x: -58, y: -58, z: 286 },
    statusCode: 0,
    statusMessage: '成功找到了位于 -58,-58,286 的方块。'
  },
  header: {
    messagePurpose: 'commandResponse',
    requestId: '/vanilla/init/oriPos',
    version: 17039360
  }
};

let tellrawmessage = {
  body: {
    message: '{"rawtext":[{"text":"§r<Wn1027>§r §e已连接: §bWS协调服务端"}]}\n',
    receiver: 'Wn1027',
    sender: '外部',
    type: 'tell'
  },
  header: {
    eventName: 'PlayerMessage',
    messagePurpose: 'event',
    version: 17039360
  }
};

let chatmsg = {
  body: { message: '这是一条聊天消息', receiver: '', sender: 'Wn1027', type: 'chat' },
  header: {
    eventName: 'PlayerMessage',
    messagePurpose: 'event',
    version: 17039360
  }
};

let tellrawcmdsuccess = {
  body: { recipient: [ 'Wn1027' ], statusCode: 0 },
  header: {
    messagePurpose: 'commandResponse',
    requestId: '0',
    version: 17039360
  }
};